// dummy pixel shader.


struct ZPassV2F 
{
	float4 HPos : POSITION;
	float4 TexCoord : TEXCOORD0;
	float ZInfo:TEXCOORD1;		// w : is the z info.
#if HAS_TANGENTSPACE
	float3 Tangent : TEXCOORD2;			// world to tangent basis
	float3 Binormal : TEXCOORD3;
	float3 Normal : TEXCOORD4;
#else
	half3 Normal:TEXCOORD2;
#endif 

};

#include <MaterialPixel>


struct ZPassPixelOutput
{
	half4 Normal:COLOR0;	// Scene Normal[In world space], and specluar power.
	half4 Depth:COLOR1;			// ALPHA BLEND ????? 
};


ZPassPixelOutput PMain(ZPassV2F Input)
{
	VPixelContext pCtx = VInitPixelContextZPass(Input);
	half3 WorldNormal = VPixelGetWorldNormal(pCtx);

	ZPassPixelOutput OUT;
	OUT.Depth = EncodedDeferredDepth(Input.ZInfo);
	OUT.Normal.xyz = EncodeDeferredNormal(WorldNormal);
	OUT.Normal.w = 0;		// specular power.
	return OUT;
}